﻿/************************************************************************
 * SMLib - State Model Library
 * Copyright (C) 2012-2013 Ali Khalili (khalili_DOT_ir_@SIGN_gmail_DOT_com)
 * **********************************************************************
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License (LGPL) published 
 * by the Free Software Foundation; either version 2.1 of the License, or (at your
 * option) any later version. This program is distributed without any
 * warranty. See the GNU Lesser General Public License for more details. 
 * ***********************************************************************
 * File         :     SMLib\Automata\IA\IBlackBox_IOLTS.cs
 * Description  :     Common interface for a -active- black box IA system 
 * Change log   :     -Feb 2013:  Initial version
 * To Do        :     
 ************************************************************************/
using System;
using System.Collections.Generic;
using SMLib.Automata.Base;


namespace SMLib.Automata.IA
{
    /// <summary>
    /// A black box system with an IA model underlying
    /// </summary>
    public interface IBlackBox_IA
    {
        /// <summary>
        /// Reset the machine to initail state
        /// </summary>
        void Reset();

        /// <summary>
        /// Perform a controllable action
        /// </summary>
        /// <param name="input">the input stimuli</param>
        void Perform(ISymbol input);

        /// <summary>
        /// Check whether an observable event is available or not
        /// </summary>
        /// <returns>true if available, false if not</returns>
        bool EventAvailable();


        /// <summary>
        /// Consume the available event (this should only be called when "EventAvailable()=true"
        /// </summary>
        /// <returns>the available event, null if there isn't any available event</returns>
        ISymbol Event();

        /// <summary>
        /// Input alphabet of the system
        /// </summary>
        Alphabet InputAlphabet
        {
            get;
        }
    }
}
